Ext.application({ // #1
	name : 'Packt', // #2
	controllers : [ 'Login', 'Menu', 'TranslationManager', 'security.Users',
			'staticData.AbstractController', 'cms.Films' ],
	launch : function() {
		var task = new Ext.util.DelayedTask(function() {
			splashscreen.fadeOut({
				duration : 1000,
				remove : true
			});
			splashscreen.next().fadeOut({
				duration : 1000,
				remove : true,
				listeners : {
					afteranimate : function(el, startTime, eOpts) {
						Ext.widget('login'); // #1
					}
				}
			});
		});
		task.delay(2000);
	},
	init : function() {
		splashscreen = Ext.getBody()
				.mask('Loading application', 'splashscreen');
		splashscreen.addCls('splashscreen');
		Ext.DomHelper.insertFirst(Ext.query('.x-mask-msg')[0], {
			cls : 'x-splash-icon'
		});
	}
});